from app.db import db
from datetime import datetime

class AdminUser(db.Model):
    __tablename__ = 'admin_user'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    phone = db.Column(db.String(50), nullable=False, comment='手机号')
    password = db.Column(db.String(50), nullable=False, comment='密码')
    gender = db.Column(db.String(50), nullable=True, comment='性别')
    image = db.Column(db.String(100), nullable=True, comment='头像路径')
    age = db.Column(db.Integer, nullable=True, comment='年龄')
    email = db.Column(db.String(50), nullable=True, comment='邮箱')
    name = db.Column(db.String(50), nullable=False, comment='真实姓名')
    postion = db.Column(db.String(50), nullable=True, comment='职位')
    update_time = db.Column(db.DateTime, nullable=True,default=datetime.utcnow, comment='更新时间')    